#!/bin/bash
# qing
#--------------------whoopsie----------------------
echo "-----------------------"
ssmeg="closing whoopsie....";
echo $ssmeg;
echo "Whoopsie is the 'Ubuntu Error Reporting' daemon. "
sudo service whoopsie stop;

#--------------------bolt----------------------
echo "-----------------------"
ssmeg="closing thunderbolt device management system....";
echo $ssmeg;
sudo service bolt stop;

#--------------------fwupd----------------------
echo "-----------------------"
ssmeg="closing Linux Vendor Firmware Service....";
echo $ssmeg;
sudo service fwupd stop;

#--------------------colord----------------------
echo "-----------------------"
ssmeg="closing service to use color by specifying the TERM environment variable....";
echo $ssmeg;
sudo service colord stop;

#--------------------ufw----------------------
echo "-----------------------"
ssmeg="closing Uncomplicated Firewall ....";
echo $ssmeg;
sudo service ufw stop;

#--------------------lm-sensors----------------------
echo "-----------------------"
ssmeg="closing hardware monitoring sensors  ....";
echo $ssmeg;
sudo service lm-sensors stop;

#--------------------cron----------------------
echo "-----------------------"
ssmeg="closing Regular background program processing daemon ...";
echo $ssmeg
sudo service cron stop

#--------------------apport----------------------
echo "-----------------------"
echo "Closing Apport ...."
echo "Apport is a system which: "
echo "> intercepts crashes right when they happen the first time, "
echo "> gathers potentially useful information about the crash "
echo "  and the OS environment, can be automatically invoked for "
echo "  unhandled exceptions in other programming languages."
sudo service apport stop

#--------------------unattended-upgrades----------------------
echo "-----------------------"
echo "Closing unattended-upgrades ...."
echo "The unattended-upgrades package can be used to automatically "
echo "install updated packages, and can be configured to "
echo "update all packages or just install security updates."
sudo service unattended-upgrades stop

#---------------------rsyslog---------------------
# echo "-----------------------"
# echo "Closing rsyslog ...."
# echo "Closing reliable system and kernel logging daemon"
# sudo service rsyslog stop

#---------------------procps---------------------
#echo "Closing procs ...."
#echo "iprocps is the package that has a bunch of small useful utilities"
#echo "that give information about processes using the /proc filesystem. "
#echo "The package includes the programs ps, top, vmstat, w, kill, free, "
#echo "slabtop, and skill. Version 3 includes NPTL thread support, "
#echo "a rewritten top, many bug fixes, performance improvements, and new features."
#sudo service procps stop

#---------------------openbsd-inetd---------------------
echo "-----------------------"
echo "Closing OpenBSD Internet Superserver ...."
sudo service openbsd-inetd stop

#----------------------kerneloop--------------------
echo "-----------------------"
echo "Closing kerneloop ...."
echo "The kerneloops applet allows the kerneloops crash "
echo "reporting utility to ask a desktop user "
echo "for permission before submitting an oops report to "
echo "the oops.kernel.org website."
sudo service kerneloop stop

#---------------------avahi-daemon---------------------
echo "-----------------------"
echo "Closing avahi-daemon ...."
echo "avahi-daemon.service is supposed to provide zero-configuration network discovery,"
echo "and make it super-easy to find printers and other hosts on your network."
sudo service avahi-daemon stop

#---------------------irqbalance---------------------
echo "-----------------------"
echo "Closing irqbalance ...."
sudo service irqbalance stop

#---------------------sysstat---------------------
echo "-----------------------"
echo "Closing sysstat (system performance tools for Linux) ...."
sudo service sysstat stop

#---------------------cpufrequtils---------------------
echo "-----------------------"
echo "Closing cpufrequtils ...."
echo "cpufrequtils are utilities to deal with the cpufreq Linux kernel feature."
sudo service cpufrequtils stop

#---------------------cups&cups-browsed---------------------
echo "-----------------------"
echo "Closing CUPS(Common UNIX Printing System) ...."
sudo service cups stop
sudo service cups-browsed stop


#---------------------alsa-utils---------------------
echo "-----------------------"
echo "Closing alsa-utils ...."
echo "alsa-utils are utilities for configuring and using ALSA "
echo "ALSA = Advanced Linux Sound Architecture ."
sudo service alsa-utils stop

#---------------------gdm3---------------------
echo "-----------------------"
echo "Closing GNOME Display Manager (gdm3) ...."
sudo service gdm3 stop

#---------------------grub-common---------------------
echo "-----------------------"
echo "Closing grub-common ...."
echo "GRUB displays the boot menu at the next boot "
echo "if it believes that the previous boot failed. "
echo "This script informs it that the system booted successfully."
sudo service grub-common stop


sudo systemctl stop acpid
sudo systemctl stop dbus
sudo systemctl stop dbus-daemon
sudo systemctl stop goa-identity-service
sudo systemctl stop grub-common
sudo systemctl stop kerneloops
sudo systemctl stop kmod
sudo systemctl stop network-manager
sudo systemctl stop openvpn
sudo systemctl stop procps
sudo systemctl stop pulseaudio
sudo systemctl stop rsyslog
sudo systemctl stop rtkit-daemon
sudo systemctl stop syslog.socket syslog.service 
sudo systemctl stop udev
sudo systemctl stop upower
sudo systemctl stop upowerd
sudo systemctl stop apache2
sudo systemctl stop NetworkManager
sudo systemctl stop acpid.service acpid.path acpid.socket
sudo systemctl stop avahi-daemon.service avahi-daemon.socket
sudo systemctl stop cups.service
sudo systemctl stop kerneloops
sudo systemctl stop proccps
sudo systemctl stop rtkit-daemon.service
sudo systemctl stop snapd snapd.socket
sudo systemctl stop switcheroo-control.service
sudo systemctl stop systemd-journald.service systemd-journald-audit.socket systemd-journald.socket systemd-journald-dev-log.socket   
sudo systemctl stop switcheroo-control.service
sudo systemctl stop systemd-resolved.service 
sudo systemctl stop systemd-timesyncd 
sudo systemctl stop systemd-timesyncd.service
sudo systemctl stop timesyncd
sudo systemctl stop udisks2.service
sudo systemctl stop wpa_supplicant.service
sudo systemctl stop phpsessionclean.timer
sudo systemctl stop anacron.timer
sudo systemctl stop ua-timer.service
sudo systemctl stop ua-timer.timer
sudo systemctl stop systemd-tmpfiles-clean.service
sudo systemctl stop systemd-tmpfiles-clean.timer


sudo killall -w gvfsd
sudo killall -w gvfds-use
sudo killall -w gvfs-udisks2-volume-monitor
sudo killall -w gvfs-mtp-volume-monitor
sudo killall -w gvfs-afc-volume-monitor
sudo killall -w gvfs-gphoto2-volume-monitor
sudo killall -w gvfs-goa-volume-monitor
sudo killall -w goa-identity-service
sudo killall -w pulseaudio
sudo killall -w tracker-miner-fs
-sudo killall -w dbus-daemon
-sudo killall -w goa-daemon


